﻿/*
This script was created by Visual Studio on 11/19/2009 at 3:39 PM.
Run this script on k0stya-pc.WinterEmpty.dbo to make it the same as k0stya-pc.Winter.dbo.
This script performs its actions in the following order:
1. Disable foreign-key constraints.
2. Perform DELETE commands. 
3. Perform UPDATE commands.
4. Perform INSERT commands.
5. Re-enable foreign-key constraints.
Please back up your target database before running this script.
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET XACT_ABORT, ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
/*Pointer used for text / image updates. This might not be needed, but is declared here just in case*/
DECLARE @pv binary(16)
BEGIN TRANSACTION
ALTER TABLE [dbo].[Groups] DROP CONSTRAINT [FK_Groups_Departments]
ALTER TABLE [meta].[Localizations] DROP CONSTRAINT [FK_Localizations_Languages]
ALTER TABLE [meta].[Localizations] DROP CONSTRAINT [FK_Localizations_Resources]
ALTER TABLE [meta].[Parameters] DROP CONSTRAINT [FK_Parameters_Resources]
ALTER TABLE [dbo].[Classes] DROP CONSTRAINT [FK_Classes_Builgings]
ALTER TABLE [dbo].[Classes] DROP CONSTRAINT [FK_Classes_Subjects]
ALTER TABLE [dbo].[Classes] DROP CONSTRAINT [FK_Classes_Teachers]
ALTER TABLE [dbo].[Classes] DROP CONSTRAINT [FK_Classes_WorkDay]
ALTER TABLE [meta].[ParameterValues] DROP CONSTRAINT [FK_ParameterValues_Parameters]
ALTER TABLE [meta].[ParameterValues] DROP CONSTRAINT [FK_ParameterValues_Resources]
ALTER TABLE [dbo].[TeacherFaculties] DROP CONSTRAINT [FK_TeacherFaculties_Faculties]
ALTER TABLE [dbo].[TeacherFaculties] DROP CONSTRAINT [FK_TeacherFaculties_Teachers]
ALTER TABLE [dbo].[Teachers] DROP CONSTRAINT [FK_Teachers_Persons]
ALTER TABLE [dbo].[TeacherDepartments] DROP CONSTRAINT [FK_TeacherDepartments_Departments]
ALTER TABLE [dbo].[TeacherDepartments] DROP CONSTRAINT [FK_TeacherDepartments_Teachers]
ALTER TABLE [dbo].[Departments] DROP CONSTRAINT [FK_Departments_Faculties]
ALTER TABLE [dbo].[TheacherSubjects] DROP CONSTRAINT [FK_TheacherSubjects_Subjects]
ALTER TABLE [dbo].[TheacherSubjects] DROP CONSTRAINT [FK_TheacherSubjects_Teachers]
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] DROP CONSTRAINT [FK__aspnet_Pe__PathI__38996AB5]
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] DROP CONSTRAINT [FK__aspnet_Pe__PathI__4CA06362]
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] DROP CONSTRAINT [FK__aspnet_Pe__UserI__398D8EEE]
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] DROP CONSTRAINT [FK__aspnet_Pe__UserI__4D94879B]
ALTER TABLE [dbo].[WorkDay] DROP CONSTRAINT [FK_WorkDay_DayOfWeek]
ALTER TABLE [dbo].[WorkDay] DROP CONSTRAINT [FK_WorkDay_Schedules]
ALTER TABLE [dbo].[Schedules] DROP CONSTRAINT [FK_Schedules_Groups]
ALTER TABLE [dbo].[aspnet_Profile] DROP CONSTRAINT [FK__aspnet_Pr__UserI__3A81B327]
ALTER TABLE [dbo].[Message] DROP CONSTRAINT [FK_Message_Persons]
ALTER TABLE [dbo].[aspnet_PersonalizationAllUsers] DROP CONSTRAINT [FK__aspnet_Pe__PathI__37A5467C]
ALTER TABLE [dbo].[PersonMessages] DROP CONSTRAINT [FK_PersonMessages_Message]
ALTER TABLE [dbo].[PersonMessages] DROP CONSTRAINT [FK_PersonMessages_Persons]
ALTER TABLE [dbo].[aspnet_UsersInRoles] DROP CONSTRAINT [FK__aspnet_Us__RoleI__3E52440B]
ALTER TABLE [dbo].[aspnet_UsersInRoles] DROP CONSTRAINT [FK__aspnet_Us__RoleI__5535A963]
ALTER TABLE [dbo].[aspnet_UsersInRoles] DROP CONSTRAINT [FK__aspnet_Us__UserI__3D5E1FD2]
ALTER TABLE [dbo].[aspnet_UsersInRoles] DROP CONSTRAINT [FK__aspnet_Us__UserI__5441852A]
ALTER TABLE [dbo].[aspnet_Paths] DROP CONSTRAINT [FK__aspnet_Pa__Appli__36B12243]
ALTER TABLE [dbo].[aspnet_Paths] DROP CONSTRAINT [FK__aspnet_Pa__Appli__49C3F6B7]
ALTER TABLE [dbo].[aspnet_Membership] DROP CONSTRAINT [FK__aspnet_Me__Appli__34C8D9D1]
ALTER TABLE [dbo].[aspnet_Membership] DROP CONSTRAINT [FK__aspnet_Me__Appli__45F365D3]
ALTER TABLE [dbo].[aspnet_Membership] DROP CONSTRAINT [FK__aspnet_Me__UserI__35BCFE0A]
ALTER TABLE [dbo].[aspnet_Membership] DROP CONSTRAINT [FK__aspnet_Me__UserI__46E78A0C]
ALTER TABLE [dbo].[aspnet_Roles] DROP CONSTRAINT [FK__aspnet_Ro__Appli__3B75D760]
ALTER TABLE [dbo].[aspnet_Roles] DROP CONSTRAINT [FK__aspnet_Ro__Appli__5165187F]
ALTER TABLE [dbo].[Faculties] DROP CONSTRAINT [FK_Faculties_Universities]
ALTER TABLE [dbo].[Students] DROP CONSTRAINT [FK_Students_Groups]
ALTER TABLE [dbo].[Students] DROP CONSTRAINT [FK_Students_Persons]
ALTER TABLE [dbo].[Persons] DROP CONSTRAINT [FK_Persons_ParameterValues]
ALTER TABLE [dbo].[aspnet_Users] DROP CONSTRAINT [FK__aspnet_Us__Appli__3C69FB99]
ALTER TABLE [dbo].[aspnet_Users] DROP CONSTRAINT [FK_aspnet_Users_Persons]
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'admin', N'2107f78b-005a-44bc-9ca6-53af799d6cb4', N'Admin', NULL, 0, '20091119 13:11:18.657', 8)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'anonymous', N'f011d25d-79e9-40ff-9480-1d4c35674913', N'Anonymous', NULL, 0, '20091105 12:28:31.787', NULL)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'bazurin', N'fcc17ccd-3566-42a1-8cda-17ec63764215', N'bazurin', NULL, 0, '20091114 15:04:11.163', 9)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'classmonitor', N'f21c42f1-27be-482b-b46a-c2d6cabffa84', N'ClassMonitor', NULL, 0, '20091105 12:28:03.250', 7)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'lina', N'edc890d7-5cf8-4a59-9520-b3019f459d76', N'lina', NULL, 0, '20091119 13:21:18.790', 17)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'luda', N'053735dc-1ef7-4eae-9d0a-feec9001175a', N'luda', NULL, 0, '20091119 13:31:43.880', 15)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'mainteacher', N'8d317d33-6d05-422b-921f-f43c8b4bb87b', N'MainTeacher', NULL, 0, '20091105 12:27:13.227', 2)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'sasha', N'29b8cbc9-2495-485f-8ecd-cad42c8ac04a', N'sasha', NULL, 0, '20091119 13:15:32.200', NULL)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'ss', N'7b4d1c7a-3ea1-48b2-a361-2ad85a314224', N'ss', NULL, 0, '20091119 12:46:54.137', 1)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'student', N'd9958909-d978-4009-a0d7-d2993053436b', N'student', NULL, 0, '20091115 17:10:01.930', 6)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'tanya', N'0284809c-73a9-45c0-9660-f3f1286ed461', N'tanya', NULL, 0, '20091119 13:23:20.003', 14)
INSERT INTO [dbo].[aspnet_Users] ([ApplicationId], [LoweredUserName], [UserId], [UserName], [MobileAlias], [IsAnonymous], [LastActivityDate], [PersonID]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'testteacher', N'081b7397-2bb8-4965-93c0-77335b68ce0c', N'TestTeacher', NULL, 0, '20091105 12:27:38.617', 3)
SET IDENTITY_INSERT [dbo].[Persons] ON
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (1, N'1', N'1', N'1', '19991003 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (2, N'Елена', N'Иллиннична', N'Чумаченко', '19921010 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (3, N'Хз', N'Хз', N'Федотова', '19921010 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (4, N'Хз', N'Хз', N'Стенин', '19921010 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (5, N'Хз', N'Хз', N'Бурлаков', '19921010 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (6, N'Имя', N'Отчество', N'Фамилия', '19921010 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (7, N'Староста', N'Старостович', N'Старостенко', '19130113 00:00:00.000', 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (8, N'_', N'_', N'_', NULL, 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (9, N'Петя', N'Петрович', N'Базурин', NULL, 1, NULL, NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (14, N'Таня', N'В', N'Линник', '19991010 00:00:00.000', 2, N'80688888888', NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (15, N'Люда', N'С', N'Люда', '19991010 00:00:00.000', 2, N'80688888888', NULL)
INSERT INTO [dbo].[Persons] ([ID], [FirstName], [SecondName], [LastName], [Birthdate], [SexID], [Phone], [Image]) VALUES (17, N'Лина', N'С', N'Дунаевска', '19991010 00:00:00.000', 2, N'80688888888', NULL)
SET IDENTITY_INSERT [dbo].[Persons] OFF
SET IDENTITY_INSERT [dbo].[Students] ON
INSERT INTO [dbo].[Students] ([ID], [GroupID], [PersonID]) VALUES (1, 1, 1)
INSERT INTO [dbo].[Students] ([ID], [GroupID], [PersonID]) VALUES (2, 1, 2)
INSERT INTO [dbo].[Students] ([ID], [GroupID], [PersonID]) VALUES (4, 3, 6)
INSERT INTO [dbo].[Students] ([ID], [GroupID], [PersonID]) VALUES (5, 1, 14)
INSERT INTO [dbo].[Students] ([ID], [GroupID], [PersonID]) VALUES (6, 1, 15)
INSERT INTO [dbo].[Students] ([ID], [GroupID], [PersonID]) VALUES (7, 1, 17)
SET IDENTITY_INSERT [dbo].[Students] OFF
SET IDENTITY_INSERT [dbo].[Universities] ON
INSERT INTO [dbo].[Universities] ([ID], [Name]) VALUES (1, N'KPI')
SET IDENTITY_INSERT [dbo].[Universities] OFF
SET IDENTITY_INSERT [dbo].[Faculties] ON
INSERT INTO [dbo].[Faculties] ([ID], [Name], [UniversityID]) VALUES (2, N'ФИОТ', 1)
INSERT INTO [dbo].[Faculties] ([ID], [Name], [UniversityID]) VALUES (3, N'ИПСА', 1)
INSERT INTO [dbo].[Faculties] ([ID], [Name], [UniversityID]) VALUES (5, N'ФПМ', 1)
INSERT INTO [dbo].[Faculties] ([ID], [Name], [UniversityID]) VALUES (6, N'ФЕЛ', 1)
INSERT INTO [dbo].[Faculties] ([ID], [Name], [UniversityID]) VALUES (7, N'РТФ', 1)
INSERT INTO [dbo].[Faculties] ([ID], [Name], [UniversityID]) VALUES (8, N'ФММ', 1)
SET IDENTITY_INSERT [dbo].[Faculties] OFF
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [LoweredRoleName], [RoleId], [RoleName], [Description]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'admin', N'4e92cadd-355e-472f-97a2-c2132b942be8', N'Admin', NULL)
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [LoweredRoleName], [RoleId], [RoleName], [Description]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'anonymous', N'df5e253c-7c76-4af2-b341-05ac089b989f', N'Anonymous', NULL)
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [LoweredRoleName], [RoleId], [RoleName], [Description]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'classmonitor', N'34ab794b-fcec-49bc-9144-001a8430a8a4', N'ClassMonitor', NULL)
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [LoweredRoleName], [RoleId], [RoleName], [Description]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'student', N'8c8e85bf-b885-4b1d-8a99-057a480851c9', N'Student', NULL)
INSERT INTO [dbo].[aspnet_Roles] ([ApplicationId], [LoweredRoleName], [RoleId], [RoleName], [Description]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'teacher', N'822565fe-deb3-413e-879f-4144569835d8', N'Teacher', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'0284809c-73a9-45c0-9660-f3f1286ed461', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'Khi+XyKJQ6wg3XIJOcdrFg2Rdpc=', 1, N'x6cEJsIBK7Q+GU3lZExcDg==', NULL, N'tanya@kpi.com', N'tanya@kpi.com', NULL, NULL, 1, 0, '20091119 13:13:05.000', '20091119 13:21:44.530', '20091119 13:13:05.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'053735dc-1ef7-4eae-9d0a-feec9001175a', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'B7IJuA3j+QpXSDaHsZot2nhViKc=', 1, N'E+jvBrZUyvunZ+7LFstSNQ==', NULL, N'luda@kpi.com', N'luda@kpi.com', NULL, NULL, 1, 0, '20091119 13:14:17.000', '20091119 13:27:54.017', '20091119 13:14:17.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'081b7397-2bb8-4965-93c0-77335b68ce0c', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N's2timqwxmJEjjUNIpcJ35kfh3Jw=', 1, N'ALumF0gmsGkILDgn7qkrpA==', NULL, N'TestTeacher@winter.com', N'testteacher@winter.com', NULL, NULL, 1, 0, '20091105 12:27:38.000', '20091105 12:27:38.617', '20091105 12:27:38.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'2107f78b-005a-44bc-9ca6-53af799d6cb4', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'uYre7fvnYgxLrIfgR92gTFHFE0k=', 1, N'SdhP4z0CBD1uDVS+kaYnsA==', NULL, N'hkostya@gmail.com', N'hkostya@gmail.com', NULL, NULL, 1, 0, '20091001 21:05:21.000', '20091119 12:47:02.127', '20091001 21:05:21.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'29b8cbc9-2495-485f-8ecd-cad42c8ac04a', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'kt8aOcpsza6J+PY+HEwS19ZPlOk=', 1, N'VXs5VWpk43u5lac7XFDsnw==', NULL, N'sasha@kpi.com', N'sasha@kpi.com', NULL, NULL, 1, 0, '20091119 13:15:32.000', '20091119 13:15:32.200', '20091119 13:15:32.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'7b4d1c7a-3ea1-48b2-a361-2ad85a314224', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'kD06mC17uv4657/Vf0v9QFTQIYA=', 1, N'ZOtcCq38xzjd5PtWkpW62w==', NULL, N'kos@2.2', N'kos@2.2', NULL, NULL, 1, 0, '20091025 17:27:27.000', '20091119 12:46:39.093', '20091025 17:27:27.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'8d317d33-6d05-422b-921f-f43c8b4bb87b', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'z9SYWYqEaVtFA2A4mXdfedW+T0Q=', 1, N'v5us8FkdWC/Ie7DSqqQvXw==', NULL, N'MainTeacher@winter.com', N'mainteacher@winter.com', NULL, NULL, 1, 0, '20091105 12:27:12.000', '20091105 12:27:13.227', '20091105 12:27:12.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'd9958909-d978-4009-a0d7-d2993053436b', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'POZXN4Z+v4O1pMVssVE4o2EhBFU=', 1, N'UG7SouWNWC/CRVfxBfmY4A==', NULL, N'Student@winter.com', N'student@winter.com', NULL, NULL, 1, 0, '20091105 12:28:51.000', '20091114 21:05:13.970', '20091105 12:28:51.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'edc890d7-5cf8-4a59-9520-b3019f459d76', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'v0yKPWFaH9W3Gp2ef2w+IZ4YGuU=', 1, N'FqUv5pLYp8cokkP9JlgMEg==', NULL, N'lina@kpi.com', N'lina@kpi.com', NULL, NULL, 1, 0, '20091119 13:15:05.000', '20091119 13:21:16.937', '20091119 13:15:05.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'f011d25d-79e9-40ff-9480-1d4c35674913', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'UCInV4H/9yx1LdfuiP4umD3o4VE=', 1, N'quuAElOwrcruMzez/K0AIQ==', NULL, N'Anonymous@winter.com', N'anonymous@winter.com', NULL, NULL, 1, 0, '20091105 12:28:31.000', '20091105 12:28:31.787', '20091105 12:28:31.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'f21c42f1-27be-482b-b46a-c2d6cabffa84', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'as+l0bdnH9SmN3UrFal+2iljt+k=', 1, N'7ljh9+cTCMfcZkwccLkpcA==', NULL, N'ClassMonitor@winter.com', N'classmonitor@winter.com', NULL, NULL, 1, 0, '20091105 12:28:03.000', '20091105 12:28:03.250', '20091105 12:28:03.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_Membership] ([UserId], [ApplicationId], [Password], [PasswordFormat], [PasswordSalt], [MobilePIN], [Email], [LoweredEmail], [PasswordQuestion], [PasswordAnswer], [IsApproved], [IsLockedOut], [CreateDate], [LastLoginDate], [LastPasswordChangedDate], [LastLockoutDate], [FailedPasswordAttemptCount], [FailedPasswordAttemptWindowStart], [FailedPasswordAnswerAttemptCount], [FailedPasswordAnswerAttemptWindowStart], [Comment]) VALUES (N'fcc17ccd-3566-42a1-8cda-17ec63764215', N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'kla20XV7ldUlkVovo0gAP2WCIN0=', 1, N'gFMVfgRfanbrMBRgfDS2Hw==', NULL, N'b@b.2', N'b@b.2', NULL, NULL, 1, 0, '20091114 15:04:11.000', '20091114 15:04:11.163', '20091114 15:04:11.000', '17540101 00:00:00.000', 0, '17540101 00:00:00.000', 0, '17540101 00:00:00.000', NULL)
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'0284809c-73a9-45c0-9660-f3f1286ed461', N'8c8e85bf-b885-4b1d-8a99-057a480851c9')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'053735dc-1ef7-4eae-9d0a-feec9001175a', N'8c8e85bf-b885-4b1d-8a99-057a480851c9')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'081b7397-2bb8-4965-93c0-77335b68ce0c', N'822565fe-deb3-413e-879f-4144569835d8')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'2107f78b-005a-44bc-9ca6-53af799d6cb4', N'4e92cadd-355e-472f-97a2-c2132b942be8')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'29b8cbc9-2495-485f-8ecd-cad42c8ac04a', N'8c8e85bf-b885-4b1d-8a99-057a480851c9')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'7b4d1c7a-3ea1-48b2-a361-2ad85a314224', N'8c8e85bf-b885-4b1d-8a99-057a480851c9')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'8d317d33-6d05-422b-921f-f43c8b4bb87b', N'822565fe-deb3-413e-879f-4144569835d8')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'd9958909-d978-4009-a0d7-d2993053436b', N'8c8e85bf-b885-4b1d-8a99-057a480851c9')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'edc890d7-5cf8-4a59-9520-b3019f459d76', N'8c8e85bf-b885-4b1d-8a99-057a480851c9')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'f011d25d-79e9-40ff-9480-1d4c35674913', N'df5e253c-7c76-4af2-b341-05ac089b989f')
INSERT INTO [dbo].[aspnet_UsersInRoles] ([UserId], [RoleId]) VALUES (N'fcc17ccd-3566-42a1-8cda-17ec63764215', N'34ab794b-fcec-49bc-9144-001a8430a8a4')
INSERT INTO [dbo].[aspnet_Applications] ([ApplicationId], [ApplicationName], [LoweredApplicationName], [Description]) VALUES (N'b623aad3-cdda-4a16-9581-53dc26c13b03', N'Winter.BackEnd', N'winter.backend', NULL)
SET IDENTITY_INSERT [dbo].[Schedules] ON
INSERT INTO [dbo].[Schedules] ([ID], [GroupID], [Year]) VALUES (1, 2, NULL)
INSERT INTO [dbo].[Schedules] ([ID], [GroupID], [Year]) VALUES (2, 3, '20091104 14:07:36.297')
INSERT INTO [dbo].[Schedules] ([ID], [GroupID], [Year]) VALUES (3, 1, '20091104 14:10:12.053')
SET IDENTITY_INSERT [dbo].[Schedules] OFF
SET IDENTITY_INSERT [dbo].[WorkDay] ON
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (1, 1, 1, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (2, 1, 2, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (4, 1, 3, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (5, 1, 4, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (6, 1, 5, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (7, 1, 6, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (9, 1, 7, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (10, 0, 1, 3)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (12, 0, 2, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (13, 0, 3, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (14, 0, 4, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (15, 0, 5, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (16, 0, 6, NULL)
INSERT INTO [dbo].[WorkDay] ([ID], [IsFirstWeek], [DayOfWeekID], [ScheduleID]) VALUES (17, 0, 7, NULL)
SET IDENTITY_INSERT [dbo].[WorkDay] OFF
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'common', N'1', 1)
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'health monitoring', N'1', 1)
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'membership', N'1', 1)
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'personalization', N'1', 1)
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'profile', N'1', 1)
INSERT INTO [dbo].[aspnet_SchemaVersions] ([Feature], [CompatibleSchemaVersion], [IsCurrentVersion]) VALUES (N'role manager', N'1', 1)
SET IDENTITY_INSERT [dbo].[Subjects] ON
INSERT INTO [dbo].[Subjects] ([ID], [Type], [Name]) VALUES (3, NULL, N'Дискретная математика')
INSERT INTO [dbo].[Subjects] ([ID], [Type], [Name]) VALUES (4, NULL, N'Теория автоматизации и управления')
INSERT INTO [dbo].[Subjects] ([ID], [Type], [Name]) VALUES (5, NULL, N'Защита информации')
INSERT INTO [dbo].[Subjects] ([ID], [Type], [Name]) VALUES (6, NULL, N'Компьютерная графика')
INSERT INTO [dbo].[Subjects] ([ID], [Type], [Name]) VALUES (7, NULL, N'В.М.')
SET IDENTITY_INSERT [dbo].[Subjects] OFF
SET IDENTITY_INSERT [dbo].[Departments] ON
INSERT INTO [dbo].[Departments] ([ID], [Name], [FacultyID]) VALUES (1, N'TK', 2)
INSERT INTO [dbo].[Departments] ([ID], [Name], [FacultyID]) VALUES (2, N'АСОИУ', 2)
INSERT INTO [dbo].[Departments] ([ID], [Name], [FacultyID]) VALUES (3, N'ВТ', 2)
INSERT INTO [dbo].[Departments] ([ID], [Name], [FacultyID]) VALUES (4, N'АУТС', 2)
SET IDENTITY_INSERT [dbo].[Departments] OFF
SET IDENTITY_INSERT [dbo].[Teachers] ON
INSERT INTO [dbo].[Teachers] ([ID], [TeacherDepartmentsID], [TeacherFacultiesID], [PersonID]) VALUES (1, NULL, 2, 2)
INSERT INTO [dbo].[Teachers] ([ID], [TeacherDepartmentsID], [TeacherFacultiesID], [PersonID]) VALUES (2, NULL, 2, 3)
INSERT INTO [dbo].[Teachers] ([ID], [TeacherDepartmentsID], [TeacherFacultiesID], [PersonID]) VALUES (3, NULL, 2, 4)
INSERT INTO [dbo].[Teachers] ([ID], [TeacherDepartmentsID], [TeacherFacultiesID], [PersonID]) VALUES (4, NULL, 2, 5)
SET IDENTITY_INSERT [dbo].[Teachers] OFF
INSERT INTO [meta].[Resources] ([Name]) VALUES (N'Female')
INSERT INTO [meta].[Resources] ([Name]) VALUES (N'Male')
INSERT INTO [meta].[Resources] ([Name]) VALUES (N'Sex')
SET IDENTITY_INSERT [meta].[ParameterValues] ON
INSERT INTO [meta].[ParameterValues] ([ID], [Value], [ParameterID]) VALUES (1, N'Male', 1)
INSERT INTO [meta].[ParameterValues] ([ID], [Value], [ParameterID]) VALUES (2, N'Female', 1)
SET IDENTITY_INSERT [meta].[ParameterValues] OFF
SET IDENTITY_INSERT [dbo].[Classes] ON
INSERT INTO [dbo].[Classes] ([ID], [SubjectID], [ClassStartTime], [ClassEndTime], [WorkDayID], [ClassNumber], [LetureRoom], [TeacherID], [BuildingID]) VALUES (2, 3, '08:30:00.0000000', '10:05:00.0000000', 10, 2, N'315', 1, 1)
SET IDENTITY_INSERT [dbo].[Classes] OFF
SET IDENTITY_INSERT [meta].[Parameters] ON
INSERT INTO [meta].[Parameters] ([Name], [ID]) VALUES (N'Sex', 1)
SET IDENTITY_INSERT [meta].[Parameters] OFF
INSERT INTO [meta].[Languages] ([Name]) VALUES (N'en-US')
INSERT INTO [meta].[Languages] ([Name]) VALUES (N'uk-UA')
SET IDENTITY_INSERT [meta].[Localizations] ON
INSERT INTO [meta].[Localizations] ([Resource], [LanguageName], [ID], [Text]) VALUES (N'Female', N'en-US', 2, N'Female')
INSERT INTO [meta].[Localizations] ([Resource], [LanguageName], [ID], [Text]) VALUES (N'Male', N'en-US', 1, N'Male')
SET IDENTITY_INSERT [meta].[Localizations] OFF
SET IDENTITY_INSERT [dbo].[Builgings] ON
INSERT INTO [dbo].[Builgings] ([ID], [BuildingName], [Latitude], [Longitude], [Location]) VALUES (1, N'K1', N'50.449297', N'30.460728', N'Peremogy Ave, Київ, Ukraine')
SET IDENTITY_INSERT [dbo].[Builgings] OFF
SET IDENTITY_INSERT [dbo].[Groups] ON
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (1, N'ИK-61', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (2, N'ИК-62', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (3, N'ИК-63', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (5, N'ИО-61', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (7, N'ИО-62', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (8, N'ИО-63', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (9, N'ИК-51', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (11, N'ИК-52', 1)
INSERT INTO [dbo].[Groups] ([ID], [Name], [DepartmentID]) VALUES (12, N'ИК-53', 1)
SET IDENTITY_INSERT [dbo].[Groups] OFF
SET IDENTITY_INSERT [dbo].[DayOfWeek] ON
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (1, N'Sunday')
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (2, N'Monday')
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (3, N'Tuesday')
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (4, N'Wednesday')
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (5, N'Thursday')
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (6, N'Friday')
INSERT INTO [dbo].[DayOfWeek] ([ID], [DayOfWeekName]) VALUES (7, N'Saturday')
SET IDENTITY_INSERT [dbo].[DayOfWeek] OFF
ALTER TABLE [dbo].[Groups] ADD CONSTRAINT [FK_Groups_Departments] FOREIGN KEY ([DepartmentID]) REFERENCES [dbo].[Departments] ([ID])
ALTER TABLE [meta].[Localizations] ADD CONSTRAINT [FK_Localizations_Languages] FOREIGN KEY ([LanguageName]) REFERENCES [meta].[Languages] ([Name])
ALTER TABLE [meta].[Localizations] ADD CONSTRAINT [FK_Localizations_Resources] FOREIGN KEY ([Resource]) REFERENCES [meta].[Resources] ([Name]) ON UPDATE CASCADE
ALTER TABLE [meta].[Parameters] ADD CONSTRAINT [FK_Parameters_Resources] FOREIGN KEY ([Name]) REFERENCES [meta].[Resources] ([Name]) ON UPDATE CASCADE
ALTER TABLE [dbo].[Classes] ADD CONSTRAINT [FK_Classes_Builgings] FOREIGN KEY ([BuildingID]) REFERENCES [dbo].[Builgings] ([ID])
ALTER TABLE [dbo].[Classes] ADD CONSTRAINT [FK_Classes_Subjects] FOREIGN KEY ([SubjectID]) REFERENCES [dbo].[Subjects] ([ID])
ALTER TABLE [dbo].[Classes] ADD CONSTRAINT [FK_Classes_Teachers] FOREIGN KEY ([TeacherID]) REFERENCES [dbo].[Teachers] ([ID])
ALTER TABLE [dbo].[Classes] ADD CONSTRAINT [FK_Classes_WorkDay] FOREIGN KEY ([WorkDayID]) REFERENCES [dbo].[WorkDay] ([ID])
ALTER TABLE [meta].[ParameterValues] ADD CONSTRAINT [FK_ParameterValues_Parameters] FOREIGN KEY ([ParameterID]) REFERENCES [meta].[Parameters] ([ID])
ALTER TABLE [meta].[ParameterValues] ADD CONSTRAINT [FK_ParameterValues_Resources] FOREIGN KEY ([Value]) REFERENCES [meta].[Resources] ([Name]) ON UPDATE CASCADE
ALTER TABLE [dbo].[TeacherFaculties] ADD CONSTRAINT [FK_TeacherFaculties_Faculties] FOREIGN KEY ([FacultyID]) REFERENCES [dbo].[Faculties] ([ID])
ALTER TABLE [dbo].[TeacherFaculties] ADD CONSTRAINT [FK_TeacherFaculties_Teachers] FOREIGN KEY ([TeacherID]) REFERENCES [dbo].[Teachers] ([ID])
ALTER TABLE [dbo].[Teachers] ADD CONSTRAINT [FK_Teachers_Persons] FOREIGN KEY ([PersonID]) REFERENCES [dbo].[Persons] ([ID])
ALTER TABLE [dbo].[TeacherDepartments] ADD CONSTRAINT [FK_TeacherDepartments_Departments] FOREIGN KEY ([DepartmentID]) REFERENCES [dbo].[Departments] ([ID])
ALTER TABLE [dbo].[TeacherDepartments] ADD CONSTRAINT [FK_TeacherDepartments_Teachers] FOREIGN KEY ([TeacherID]) REFERENCES [dbo].[Teachers] ([ID])
ALTER TABLE [dbo].[Departments] ADD CONSTRAINT [FK_Departments_Faculties] FOREIGN KEY ([FacultyID]) REFERENCES [dbo].[Faculties] ([ID])
ALTER TABLE [dbo].[TheacherSubjects] ADD CONSTRAINT [FK_TheacherSubjects_Subjects] FOREIGN KEY ([SubjectID]) REFERENCES [dbo].[Subjects] ([ID])
ALTER TABLE [dbo].[TheacherSubjects] ADD CONSTRAINT [FK_TheacherSubjects_Teachers] FOREIGN KEY ([TeacherID]) REFERENCES [dbo].[Teachers] ([ID])
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [FK__aspnet_Pe__PathI__38996AB5] FOREIGN KEY ([PathId]) REFERENCES [dbo].[aspnet_Paths] ([PathId])
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [FK__aspnet_Pe__PathI__4CA06362] FOREIGN KEY ([PathId]) REFERENCES [dbo].[aspnet_Paths] ([PathId])
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [FK__aspnet_Pe__UserI__398D8EEE] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[aspnet_PersonalizationPerUser] ADD CONSTRAINT [FK__aspnet_Pe__UserI__4D94879B] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[WorkDay] ADD CONSTRAINT [FK_WorkDay_DayOfWeek] FOREIGN KEY ([DayOfWeekID]) REFERENCES [dbo].[DayOfWeek] ([ID])
ALTER TABLE [dbo].[WorkDay] ADD CONSTRAINT [FK_WorkDay_Schedules] FOREIGN KEY ([ScheduleID]) REFERENCES [dbo].[Schedules] ([ID])
ALTER TABLE [dbo].[Schedules] ADD CONSTRAINT [FK_Schedules_Groups] FOREIGN KEY ([GroupID]) REFERENCES [dbo].[Groups] ([ID])
ALTER TABLE [dbo].[aspnet_Profile] ADD CONSTRAINT [FK__aspnet_Pr__UserI__3A81B327] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[Message] ADD CONSTRAINT [FK_Message_Persons] FOREIGN KEY ([SenderID]) REFERENCES [dbo].[Persons] ([ID])
ALTER TABLE [dbo].[aspnet_PersonalizationAllUsers] ADD CONSTRAINT [FK__aspnet_Pe__PathI__37A5467C] FOREIGN KEY ([PathId]) REFERENCES [dbo].[aspnet_Paths] ([PathId])
ALTER TABLE [dbo].[PersonMessages] ADD CONSTRAINT [FK_PersonMessages_Message] FOREIGN KEY ([MessageID]) REFERENCES [dbo].[Message] ([ID])
ALTER TABLE [dbo].[PersonMessages] ADD CONSTRAINT [FK_PersonMessages_Persons] FOREIGN KEY ([PersonID]) REFERENCES [dbo].[Persons] ([ID])
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [FK__aspnet_Us__RoleI__3E52440B] FOREIGN KEY ([RoleId]) REFERENCES [dbo].[aspnet_Roles] ([RoleId])
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [FK__aspnet_Us__RoleI__5535A963] FOREIGN KEY ([RoleId]) REFERENCES [dbo].[aspnet_Roles] ([RoleId])
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [FK__aspnet_Us__UserI__3D5E1FD2] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[aspnet_UsersInRoles] ADD CONSTRAINT [FK__aspnet_Us__UserI__5441852A] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[aspnet_Paths] ADD CONSTRAINT [FK__aspnet_Pa__Appli__36B12243] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[aspnet_Paths] ADD CONSTRAINT [FK__aspnet_Pa__Appli__49C3F6B7] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [FK__aspnet_Me__Appli__34C8D9D1] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [FK__aspnet_Me__Appli__45F365D3] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [FK__aspnet_Me__UserI__35BCFE0A] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[aspnet_Membership] ADD CONSTRAINT [FK__aspnet_Me__UserI__46E78A0C] FOREIGN KEY ([UserId]) REFERENCES [dbo].[aspnet_Users] ([UserId])
ALTER TABLE [dbo].[aspnet_Roles] ADD CONSTRAINT [FK__aspnet_Ro__Appli__3B75D760] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[aspnet_Roles] ADD CONSTRAINT [FK__aspnet_Ro__Appli__5165187F] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[Faculties] ADD CONSTRAINT [FK_Faculties_Universities] FOREIGN KEY ([UniversityID]) REFERENCES [dbo].[Universities] ([ID])
ALTER TABLE [dbo].[Students] ADD CONSTRAINT [FK_Students_Groups] FOREIGN KEY ([GroupID]) REFERENCES [dbo].[Groups] ([ID])
ALTER TABLE [dbo].[Students] ADD CONSTRAINT [FK_Students_Persons] FOREIGN KEY ([ID]) REFERENCES [dbo].[Persons] ([ID])
ALTER TABLE [dbo].[Persons] ADD CONSTRAINT [FK_Persons_ParameterValues] FOREIGN KEY ([SexID]) REFERENCES [meta].[ParameterValues] ([ID])
ALTER TABLE [dbo].[aspnet_Users] ADD CONSTRAINT [FK__aspnet_Us__Appli__3C69FB99] FOREIGN KEY ([ApplicationId]) REFERENCES [dbo].[aspnet_Applications] ([ApplicationId])
ALTER TABLE [dbo].[aspnet_Users] ADD CONSTRAINT [FK_aspnet_Users_Persons] FOREIGN KEY ([PersonID]) REFERENCES [dbo].[Persons] ([ID])
COMMIT TRANSACTION
